package router

import (
	"github.com/gin-contrib/cors"
	"github.com/gin-gonic/gin"
	"xinwen/handlers"
)

func Init() *gin.Engine {

	r := gin.Default()

	r.Use(cors.Default())
	r.Static("static", "./static")
	r.GET("/", handlers.Test)

	return r
}
